package com.highspeed.bdk.controller.search;

import com.highspeed.bdk.TestMainApplication;
import com.highspeed.bdk.service.search.SearchService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

import java.util.List;
import java.util.Map;

/**
 * @program: bdk-service
 * @description:
 * @author: Chenjiabin
 * @create: 2018-04-22 20:29
 **/

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {TestMainApplication.class})
@Transactional
public class SearchServiceTester {
    @Autowired
    private SearchService searchService;

    @Test
    public void search() {
        List<Map> datas = searchService.search("1");
        Assert.isTrue(!datas.isEmpty());
    }
}
